<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
</head>

<body>
  <script>
    async function loadWasm() {
      const response = await fetch('sin_demo.wasm');
      const buffer = await response.arrayBuffer();
      const module = await WebAssembly.instantiate(buffer);
      const sinValue = module.instance.exports.my_sin(Math.PI / 2);
      console.log(sinValue);
    }
    loadWasm();
  </script>
</body>

</html>

